<?php
	namespace AppBundle\Entity;

	use Doctrine\ORM\Mapping as ORM;
    use Doctrine\Common\Collections\ArrayCollection;

	/**
	 * @ORM\Entity
	 * @ORM\Table(name="major")
	 */
	class Major{
		/**
		 * @ORM\Column(type="integer")
		 * @ORM\Id
		 * @ORM\GeneratedValue(strategy="AUTO")
		 * @var [type]
		 */
		private $id;

		/**
		 * @ORM\Column(type="string",length=32)
		 * @var [type]
		 */
		private $name;

		/**
		 * @ORM\Column(type="integer")
		 * @var [type]
		 */
		private $status;

        /**
         * @ORM\ManyToOne(targetEntity="Student", inversedBy="majors"))
         * @ORM\JoinColumn(name="student_id", referencedColumnName="id")
         * @var [type]
         */
        private $student;

    public function __construct(){
        $this->status = 1;
    }
	
    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     *
     * @return Major
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set status
     *
     * @param integer $status
     *
     * @return Major
     */
    public function setStatus($status)
    {
        $this->status = $status;

        return $this;
    }

    /**
     * Get status
     *
     * @return integer
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * Set student
     *
     * @param \AppBundle\Entity\Student $student
     *
     * @return Major
     */
    public function setStudent(\AppBundle\Entity\Student $student = null)
    {
        $this->student = $student;

        return $this;
    }

    /**
     * Get student
     *
     * @return \AppBundle\Entity\Student
     */
    public function getStudent()
    {
        return $this->student;
    }
}
